package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.OtherAbsenceRecord;
import com.ruoyi.system.domain.OtherBlocketRecord;
import com.ruoyi.system.mapper.OtherAbsenceRecordMapper;
import com.ruoyi.system.mapper.OtherBlockedRecordMapper;
import com.ruoyi.system.service.IOtherAbsenceRecordService;
import com.ruoyi.system.service.IOtherBlockedRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@Service
@DataSource(value = DataSourceType.SLAVE)
public class OtherAbsenceRecordServiceImpl extends ServiceImpl<OtherAbsenceRecordMapper, OtherAbsenceRecord> implements IOtherAbsenceRecordService {

    @Resource
    private OtherAbsenceRecordMapper otherAbsenceRecordMapper;
    @DataSource(value = DataSourceType.SLAVE)
    public List<HashMap> getAbsenceRecord(String roomId, String startDate, String endDate, String startTime, String endTime) {
        return otherAbsenceRecordMapper.getAbsenceRecord(roomId, startDate, endDate, startTime, endTime);
    }
    @DataSource(value = DataSourceType.SLAVE)
    public List<OtherAbsenceRecord> getAbsenceRecordByMember(String roomId, String wxid, String startDate, String endDate, String startTime, String endTime){
        return otherAbsenceRecordMapper.getAbsenceRecordByMember(roomId,  wxid, startDate, endDate, startTime, endTime);
    }

}
